package com.haole.ecommercepay.transactions.service;

import com.alibaba.fastjson.JSONObject;
import com.haole.ecommercepay.common.BaseParam;
import com.haole.ecommercepay.transactions.entity.QueryTransactionsParam;
import com.haole.ecommercepay.transactions.entity.close.CloseTransactionsParam;
import com.haole.ecommercepay.transactions.entity.jsapi.JsapiParam;
import com.haole.ecommercepay.transactions.entity.jsapi.PayParam;

/**
 * @author haole
 */
public interface TransactionsService {

    /**
     * 合单下单-JS支付
     * @param param
     * @return
     */
    JSONObject jsapi(JsapiParam param, BaseParam baseParam);
    /**
     * 合单下单-APP支付
     * @param param
     * @return
     */
    JSONObject appPay(JsapiParam param, BaseParam baseParam);
    /**
     * 合单下单-H5支付
     * @param param
     * @return
     */
    JSONObject h5Pay(PayParam param, BaseParam baseParam);
    /**
     * 合单下单-Native支付
     * @param param
     * @return
     */
    JSONObject nativePay(PayParam param, BaseParam baseParam);
    /**
     * 合单查询订单
     * @param param
     * @return
     */
    JSONObject queryTransactions(QueryTransactionsParam param);
    /**
     * 合单关闭订单
     * @param param
     * @param combineOutTradeNo 合单支付商户总订单号
     * @return
     */
    JSONObject closeTransactions(CloseTransactionsParam param, String combineOutTradeNo);
}
